package com.songlanyun.modules.aboutus.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.songlanyun.common.drive.RootEntity;
import com.songlanyun.common.validator.group.AddGroup;
import com.songlanyun.common.validator.group.UpdateGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 关于我们
 *
 * @author wuchao
 * @email sunlightcs@gmail.com
 * @date 2021-03-30 15:54:03
 */
@Data
@TableName("yxt_about_us")
public class AboutUsEntity extends RootEntity<Long, AboutUsEntity> implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    private Long id;
    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空")
    @Length(min = 1, max = 10, message = "标题长度在1-10个字")
    private String title;
    /**
     * 简介
     */
    @NotBlank(message = "简介不能为空")
    @Length(min = 1, max = 200, message = "简介长度在1-200个字")
    private String intro;
    /**
     *
     */
//    @NotBlank(message = "内容不能为空")
    private String content;
    /**
     * 排序号
     */
    private Integer sequence;
    /**
     *
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     *
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    @Override
    public Long getIdentity() {
        return this.getId();
    }
}
